package com.fwtai.exception;

import com.fwtai.tool.ToolClient;

import java.util.concurrent.CompletionException;

/**
 * 自定义异步异常信息,用法: throw new ExceptionCompletion("门店未绑定服务");,取值 ToolClient.responseJson(exception.getMessage(),response);
 * @作者 田应平
 * @版本 v1.0
 * @创建时间 2023-07-17 20:54
 * @QQ号码 444141300
 * @Email service@dwlai.com
 * @官网 http://www.fwtai.com
*/
public final class ExceptionCompletion extends CompletionException{

  public ExceptionCompletion(final String message){
    super(ToolClient.exceptionJson(message));
  }

  public ExceptionCompletion(final String message,final Throwable cause){
    super(ToolClient.exceptionJson(message),cause);
  }
}